package com.example.user.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spring.web.plugins.Docket;

@Configuration("UserSwaggerConfig")
public class UserSwaggerConfig {

    private final com.example.common.config.SwaggerConfig commonSwaggerConfig;

    public UserSwaggerConfig(com.example.common.config.SwaggerConfig commonSwaggerConfig) // 注入common的 Swagger 配置
    {
        this.commonSwaggerConfig = commonSwaggerConfig;
    }

    @Bean("UserApiDocket")
    public Docket bookSwaggerConfig() {
        return commonSwaggerConfig.createRestApi(
                "com.example.user.controller",
                "BookShop-Cloud （User）API 文档"
        );
    }
}
